package simpackNew;


// Modified by Lucas
public class Const {
    public static final int MAX_TOKENS = 100;	// Max type of tokens
    public static final int MAX_SERVERS = 100;
    public static final int MAX_FACILITIES = 100;
    public static final int MAX_NUM_ATTR = 10;
    public static final int HEAP_SIZE = 50000;
    // public static final int CALQSPACE = 49153;
    // public static final int MAXNBUCKETS = 32768;
    public static final int UNIX = 1;
    public static final int UNIXX = 0;
    public static final int TURBOC = 0;
    public static final int NIL = 0;
    public static final int FREE = 0;
    public static final int BUSY =1;
    public static final int ON =1;
    public static final int OFF =0;
    public static final int FOUND =1;
    public static final int NOT_FOUND =-1;
    public static final int TIME_KEY =0;
    public static final int AHEAD_PRIORITY_KEY =1;
    public static final int BEHIND_PRIORITY_KEY =2;
    public static final int INTERACTIVE =0;
    public static final int BATCH =1;
    public static final int LINKED =0;
    public static final int HEAP =1;
    public static final int CALENDAR =2;
    public static final int HENRIK =3;
    public static final int INOMIAL =4;
    public static final int LEFTIST =5;
    public static final int PAGODA =6;
    public static final int PAIR =7;
    public static final int SKEWDN =8;
    public static final int SKEWUP =9;
    public static final int SPLAY =10;
    public static final int TWOLIST =11;
    public static final int REMOVE_DUPLICATES =16;
    public static final int RESEED =32;
    public static final int true_ =1;
    public static final int false_ =0;
    public static final int SYNC = 0;
    public static final int ASYNC = 1;
    public static final int DUPTIME = 0;
    public static final int DEFTIME = 1;   

    
    // Created by Lucas
    /** =================================================================================
     *  Queuing Model Constants
     *  --------------------------------------------------------------------------------- */
    
    /**
     * Events descriptors
     * */
    public static final int ARRIVAL = 1;	// Arrival
    public static final int RQST_SRVR = 2;	// Request Server
    public static final int RLS_SRVR = 3;	// Release Server

    /**
     * Classes descriptors
     * */
    public static final int CLASSE_A = 0;
    public static final int CLASSE_B = 1;
    
    /**
     * Schedule politics descriptors
     * */
    public static final int FIFO = 0;
    public static final int EBS = 1;
    public static final int SJF = 2;
    
    /**
     * Mean times (ms)
     * */
    public static final double SERVICE_TIME = 3.0;
    public static final double ARRIVAL_TIME = 4.0;
    
    public static final double DEVIATION_ACCEPTABLE = 0.03;	// Percentage
    
    public static final int N_REQUESTS = 100000;	// Number of arrival
    public static final int N_CLASSES = 2;		// Number of type of classes
    public static final int N_USERS_A = 10;		// Number of Class A users
    public static final int N_USERS_B = 10;		// Number of Class B users
    public static final int N_SERVERS = 1;		// Number of servers per service center
    public static final int N_POLITICS = 3;
    
//    public static final double ALFA = 0.00009;
//    public static final double ALFA = 0.9995;
    public static final double ALFA = 0.001;
    
    public static final int  DECIMAL_PLACE = 2;		// Used to round off a number
    public static final double INTERVAL = 5.0;
    
    /**
     * Error codes
     * */
    public static final int CONTRACT_ERROR = 1;		// Amount of contracts is incompatible with the amount of classes
    public static final int OPENNING_STREAMS_ERROR = 2;
    public static final int CLOSING_STREAMS_ERROR = 3;
    public static final int READING_SERVICE_TIME_ERROR = 4;
    public static final int READING_ARRIVAL_TIME_ERROR = 5;
    public static final int BAD_EVENT_ERROR = 6;	// Bad type of event
    public static final int BAD_POLITCS_ERROR = 7;	// Bad type of politics
    public static final int BAD_INPUT_DIR_ERROR = 8;	// Input directory doesn't exist
    public static final int HISTOGRAM_ERROR = 9;
    
    /**
     * Type of date to be calculate the deviation
     * */
    public static final int LATENCIES_BELOW_AVERAGE = 0;
    public static final int FULFILMENT_PERCENTAGE = 1;
    
    /**
     * Files and directories
     * */
    public static final String DATA_DIR = "Data";
    public static final String LATENCIES_BELOW_AVERAGE_DIR = "Latencies Below Average";
    public static final String FULFILMENT_DIR = "Fulfilment Percentages";
    public static final String HISTOGRAM_DIR = "Histogram Percentages";
    public static final String SIMULATION_DIR = "Simulation_";
    public static final String ARRIVAL_MEAN_DIR = "ArrivalMean_";
    public static final String PERCENTAGE_DIR = "Percentage_";
    public static final String CONTRACT_DIR = "Contract_";
}